
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>协同办公系统登陆</title>
    <link rel="stylesheet" href="../static/css/bootstrap.css">
    <link rel="stylesheet" href="../static/js/layui/css/layui.css">
    <link rel="stylesheet" href="../static/css/font.css">
    <style>

        #boxes{
            width: 98%;
            margin: auto;
            display: flex;
            flex-direction: row;

        }
        #boxes>div{
            margin-left: 5%;
        }
        #left>a{
            margin-top:30px;
            margin-left: 20px;
        }
        #logo{
            margin-top: 20px;
            margin-left: 10%;
            height: 80px;
            display: flex;
            flex-direction: row;

        }
        #tiao{
            width: 100%;
            height: 50px;
            background-image: url("../static/imaegs/breadbg.gif");
            display: flex;
            flex-direction: row;
        }
        #right{
            margin-top: 10px;
            margin-left: 50%;

        }
        #from_block{
            width: 60%;
            margin-left: 10%;
            margin-top: 20px;
            height: 300px;
            padding-top: 20px;

        }
        #left{
            margin-left: 10%;
            margin-top: 10px;
        }

    </style>
</head>
<body>
<div id="logo"><h2>协同办公系统登陆</h2></div>
<div id="tiao">
    <div id="left"><a href="http://jishubu.xyz"><i class="layui-icon" style="font-size: 20px; color: #1E9FFF;">&#xe68e;</i>&nbsp;首页</a><a><i class="layui-icon" style="font-size: 20px; color: #1E9FFF;">&#xe770;</i>&nbsp;登录页面</a></div>
    <div id="right"><a style="color:grey">没有账号?&nbsp;</a><a href="regesitor.html">账号申请</a></div>
</div>
<div id="from_block">
    <form method="post" >
        <div class="layui-form-item">
            <label class="layui-form-label login-form"><i class="iconfont" style="color: #0b3b8c">&#xe6b8;</i></label>
            <div class="layui-input-inline login-inline">
                <input type="text" name="username" id="username" lay-verify="required" placeholder="请输入你的帐号" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label login-form"><i class="iconfont" style="color: #0b3b8c">&#xe82b;</i></label>
            <div class="layui-input-inline login-inline">
                <input type="password" name="password" id="password"  lay-verify="required" placeholder="请输入你的密码" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="form-actions">
            <button class="btn btn-warning " lay-submit lay-filter="login" style="margin-left: 10%" onclick="login()" type="button">登&nbsp;&nbsp;录</button>
        </div>
    </form>
</div>
<hr>

<div id="boxes">
    <div id="boxes-left">
        <label>部门规章制度</label>
        <hr>
        <a>
            遵守开会相关事宜，熟悉部门活动工作流程，对工作态度认真，积极。有问题及时反应
        </a>
    </div>
    <div id="boxes-left">
        <label>相关工作</label>
        <hr>
        <a>设计PPT、喷绘、工作牌、图片、音频、视频、系统安装等。协助各个部门做好宣传工作，通过网络平台充分展现我院学生特色及风采。</a>
    </div>
    <div id="boxes-left">
        <label>2018年的工作计划与期望</label>
        <hr>
        <a>积极开展相关的软件培训，相互深入学习，同时在工作中努力创新，积极开展各项所需的活动。</a>
    </div>
</div>
<script src="../static/js/jquery.min.js"></script>
<script src="../static/js/layui/layui.all.js"></script>
<script>
    function login() {
        var user_name = $('input[name="username"]'),
            user_pwd = $('input[name="password"]');
        if (user_name.val() === '') {
            layer.msg ('你的账号还未填写');
            return false;


        }
        if (user_pwd.val() === '') {
            layer.msg('你的密码还未填写');
            return false;
        }
        else {
            $user = user_name.val();
            $pass = user_pwd.val();
            $.ajax({
                type: 'post',
                cache: 'false',
                url: '../php/admin/login.php',
                data: {
                    "user": $user,
                    "pass": $pass,
                },
                dataType: 'Json',
                success: function (dat) {
                    layer.msg(dat.message);


                },
                error: function (dat) {
                    layer.msg("登陆失败，请检查网络是否正常");
                }


            })


        }







    }


</script>
</body>
</html>